package LOGICA.Entidades;
// Generated 25/10/2014 10:24:22 AM by Hibernate Tools 3.2.1.GA


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Admpers generated by hbm2java
 */
@Entity
@Table(name="admpers"
    ,catalog="jguttz"
)
public class Admpers  implements java.io.Serializable {


     private String nidPersona;
     private Logdepart logdepart;
     private Logdistrit logdistrit;
     private String TNombre;
     private String TApellido;
     private String ESexo;
     private Date FFechaNac;
     private String TCorreoElec;
     private Set admusuas = new HashSet(0);

    public Admpers() {
    }

	
    public Admpers(String nidPersona, Logdepart logdepart, Logdistrit logdistrit) {
        this.nidPersona = nidPersona;
        this.logdepart = logdepart;
        this.logdistrit = logdistrit;
    }
    public Admpers(String nidPersona, Logdepart logdepart, Logdistrit logdistrit, String TNombre, String TApellido, String ESexo, Date FFechaNac, String TCorreoElec, Set admusuas) {
       this.nidPersona = nidPersona;
       this.logdepart = logdepart;
       this.logdistrit = logdistrit;
       this.TNombre = TNombre;
       this.TApellido = TApellido;
       this.ESexo = ESexo;
       this.FFechaNac = FFechaNac;
       this.TCorreoElec = TCorreoElec;
       this.admusuas = admusuas;
    }
   
     @Id 
    
    @Column(name="NID_PERSONA", unique=true, nullable=false, length=100)
    public String getNidPersona() {
        return this.nidPersona;
    }
    
    public void setNidPersona(String nidPersona) {
        this.nidPersona = nidPersona;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="NFK_DEPARTAMENTO", nullable=false)
    public Logdepart getLogdepart() {
        return this.logdepart;
    }
    
    public void setLogdepart(Logdepart logdepart) {
        this.logdepart = logdepart;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="NFK_DISTRITO", nullable=false)
    public Logdistrit getLogdistrit() {
        return this.logdistrit;
    }
    
    public void setLogdistrit(Logdistrit logdistrit) {
        this.logdistrit = logdistrit;
    }
    
    @Column(name="T_NOMBRE", length=100)
    public String getTNombre() {
        return this.TNombre;
    }
    
    public void setTNombre(String TNombre) {
        this.TNombre = TNombre;
    }
    
    @Column(name="T_APELLIDO", length=100)
    public String getTApellido() {
        return this.TApellido;
    }
    
    public void setTApellido(String TApellido) {
        this.TApellido = TApellido;
    }
    
    @Column(name="E_SEXO", length=5)
    public String getESexo() {
        return this.ESexo;
    }
    
    public void setESexo(String ESexo) {
        this.ESexo = ESexo;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="F_FECHA_NAC", length=19)
    public Date getFFechaNac() {
        return this.FFechaNac;
    }
    
    public void setFFechaNac(Date FFechaNac) {
        this.FFechaNac = FFechaNac;
    }
    
    @Column(name="T_CORREO_ELEC", length=100)
    public String getTCorreoElec() {
        return this.TCorreoElec;
    }
    
    public void setTCorreoElec(String TCorreoElec) {
        this.TCorreoElec = TCorreoElec;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="admpers")
    public Set getAdmusuas() {
        return this.admusuas;
    }
    
    public void setAdmusuas(Set admusuas) {
        this.admusuas = admusuas;
    }




}


